From e6fdcce75f8066b432c53d54fcdccad05b28c5a4 Mon Sep 17 00:00:00 2001 From: Marco A L Barbosa Date: Mon, 13 Feb 2017 15:34:29 -0200 Subject: [PATCH] Pass multiples --test-args to the tester Like --cfg, --test-args accept multiple matches, we should use it and avoid some unexpected behavior joinning the arguments with space. --- src/cargo/ops/cargo_test.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cargo/ops/cargo_test.rs b/src/cargo/ops/cargo_test.rs index 6c267efb6..a7a4504d3 100644 --- a/src/cargo/ops/cargo_test.rs +++ b/src/cargo/ops/cargo_test.rs @@ -141,8 +141,8 @@ fn run_doc_tests(options: &TestOptions, p.arg("-L").arg(native_dep); } - if test_args.len() > 0 { - p.arg("--test-args").arg(&test_args.join(" ")); + for arg in test_args { + p.arg("--test-args").arg(arg); } if let Some(cfgs) = compilation.cfgs.get(&package.package_id()) { -- 2.30.2